/*********************************************************************
Copyright 2011 Chris Gardner

This file is part of CardLib.

CardLib is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

CardLib is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with CardLib.  If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/

using Microsoft.Xna.Framework.Graphics;

namespace FreestyleCoding.CardLib {

	/// <summary>Provides a concrete implementation of an IPlayingCard that uses the Poker Ranks and Suits.</summary>
	/// <remarks>This is an internal class.
	/// Users cannot make a PokerCard.
	/// They are part of a PokerDeck.</remarks>
	internal class PokerCard : IPlayingCard {
		/// <summary>Creates a new PokerCard.</summary>
		/// <remarks>All information is determed at construction.</remarks>
		/// <param name="p_Rank">The rank of the card</param>
		/// <param name="p_Suit">The suit of the card</param>
		/// <param name="p_Face">The face artwork</param>
		/// <param name="p_Back">The back artwork</param>
		public PokerCard( Ranks p_Rank, Suits p_Suit, Texture2D p_Face, Texture2D p_Back ) {
			Rank = p_Rank;
			Suit = p_Suit;
			Face = p_Face;
			Back = p_Back;
		}

		/// <summary>Gets the artwork for the face of the card</summary>
		public Texture2D Face {
			get;
			private set;
		}

		/// <summary>Gets the artwork for the back of the card</summary>
		public Texture2D Back {
			get;
			private set;
		}

		/// <summary>Gets the suit for the card</summary>
		public Suits Suit {
			get;
			private set;
		}

		/// <summary>Gets the rank for the card</summary>
		public Ranks Rank {
			get;
			private set;
		}

		public override string ToString() {
			return string.Format( "{0} of {1}", Rank, Suit );
		}
	}
}
